<?php
  
 /**
  * @package JooS
  * @subpackage Syntax_PHPackager
  */

  require_once "JooS/Syntax/Complex/Transition.php";

  class JooS_Syntax_PHPackager_Relations_By_IniGet extends JooS_Syntax_Complex_Transition {
    /**
     * @return string
     */
    public function compile() {
      $ret = parent::compile();
      if ($ret !== false) {
        $ret = "\$this->getRelationByIniGet(" . $this->getParsedValue(4) . ", " . $this->getParsedValue(8) . ")";
      }
      return $ret;
    }

    /**
     * @return JooS_Syntax_Complex_Concatenate
     */
    public function createRule() {
      $parser = $this->getParser();
      
      return $parser->createSyntax("Complex_Concatenate", array(
        $parser->createSyntax("Simple_Symbol", "ini_get"),
        $parser->createSyntax("Common_WhiteSpace"),
        $parser->createSyntax("Simple_Symbol", "("),
        $parser->createSyntax("Common_WhiteSpace"),
        $parser->createSyntax("Common_String"),
        $parser->createSyntax("Common_WhiteSpace"),
        $parser->createSyntax("Simple_Symbol", ","),
        $parser->createSyntax("Common_WhiteSpace"),
        $parser->createSyntax("PHPackager_Expression"),
        $parser->createSyntax("Common_WhiteSpace"),
        $parser->createSyntax("Simple_Symbol", ")"),
      ));
    }
  }
